import 'dart:async';

main() {
  // Broadcast streams can be listened to by multiple consumers.
  var sc = new StreamController<int>.broadcast();
  var broadcastStream = sc.stream;
  broadcastStream.listen((int v) => print('s1: $v'));
  broadcastStream.listen((int v) => print('s2: $v'));
  sc.add(1);
  sc.add(2);
  //sc.add('str'); //int类型无效啊!?
}
//EOP
